package com.lecloud.api.connect;

import java.util.Map;

import cn.edu.live.util.TimeUtil;

import com.lecloud.constant.Const;
import com.lecloud.model.PublicParam;
import com.lecloud.util.LeCloudVerify;
import com.lecloud.util.Sender;

/**
 * 直播活动结束接口（ver=4.0）
 * 
 * @author zhagz
 * 
 */
public class FinishActivity {

	private static final String finishActivity_method = "lecloud.cloudlive.activity.stop";
	private static final String finishActivity_ver = "4.0";

	public boolean finishActivity(String activityId) {
		Map<String, String> map = PublicParam.getPublicParamMap(finishActivity_method, finishActivity_ver,
				Const.userid, TimeUtil.currentTime());
		map.put("activityId", activityId);

		String sign = LeCloudVerify.getSign(map);
		map.put("sign", sign);
		try {
			Sender.get(Const.common_url, map);
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}

		return true;
	}

}
